package org.example.backend.Module.School.School.Pojo.Entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.Date;

@Data
@NoArgsConstructor
public class School {

    @TableId(type = IdType.NONE)
    @NotNull(groups = {OnUpdate.class}, message = "学校编码不能为空")
    @Null(groups = {OnAdd.class}, message = "不可传递学校编码")
    @ApiModelProperty(value = "学校编码")
    private Long id;

    @ApiModelProperty(value = "学校名称")
    private String name;

    @ApiModelProperty(value = "管理员ID")
    private Long adminId;

    @ApiModelProperty(value = "联系方式")
    private String contact;

    @ApiModelProperty(value = "学校logo图片链接")
    private String logo;

    @ApiModelProperty(value = "学校介绍")
    private String desc;

    @ApiModelProperty(value = "简介图片")
    private String descPic;

    @ApiModelProperty(value = "简介视频")
    private String descVideo;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    public static class OnUpdate {}

    public static class OnAdd {}
}
